<template>
<el-dialog :visible.sync="visible" title="详情" :close-on-click-modal="false" :close-on-press-escape="false">
    <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="100px">
        <el-row :gutter="30">
             <el-col :span="12">
                <el-form-item label="下单手机号:">
                    <p class="txt">{{ dataForm.guestPhone||'' }}</p>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="发票抬头:">
                    <p class="txt">{{ dataForm.invoiceTitle||'' }}</p>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="抬头类型:">
                    <p class="txt">
                        {{ dataForm.type == 1 ? "个人/非企业单位" : "企业" }}
                    </p>
                </el-form-item>
            </el-col>
           
            <el-col :span="12">
                <el-form-item label="交易金额:">
                    <p class="txt">{{ dataForm.orderAmount||'' }}</p>
                </el-form-item>
            </el-col>
             <el-col :span="12">
                <el-form-item label="订单编号:">
                    <p class="txt">{{ dataForm.orderCode||'' }}</p>
                </el-form-item>
            </el-col>
             <el-col :span="12">
                <el-form-item label="开户银行:">
                    <p class="txt">{{ dataForm.depositBank||'' }}</p>
                </el-form-item>
            </el-col>
              <el-col :span="12">
                <el-form-item label="单位地址:">
                    <p class="txt">{{ dataForm.unitAddress||'' }}</p>
                </el-form-item>
            </el-col>
              <el-col :span="12">
                <el-form-item label="电话号码:">
                    <p class="txt">{{ dataForm.unitPhone||'' }}</p>
                </el-form-item>
            </el-col>
             <el-col :span="12">
                <el-form-item label="税号:">
                    <p class="txt">{{ dataForm.taxNumber||'' }}</p>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="邮箱:">
                    <p class="txt">{{ dataForm.email||'' }}</p>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="状态:">
                    <p class="txt">{{dataForm.disposeState==0?'待处理':'已处理'}}</p>
                </el-form-item>
            </el-col>
        </el-row>
    </el-form>
</el-dialog>
</template>
<script>
import debounce from "lodash/debounce";
export default {
    data() {
        return {
            visible: false,
            dataForm: {
                id: "",
            },
        };
    },
    computed: {

    },
    methods: {
        init() {
            this.visible = true;
            this.$nextTick(() => {
                this.$refs["dataForm"].resetFields();
                if (this.dataForm.id) {
                    this.getInfo();
                }
            });
        },
        // 获取信息
        getInfo() {
            this.$http
                .get("/hotel/invoice/" + this.dataForm.id)
                .then(({
                    data: res
                }) => {
                    if (res.code !== 0) {
                        return this.$message.error(res.msg);
                    }
                    this.dataForm = {
                        ...this.dataForm,
                        ...res.data,
                    };
                })
                .catch(() => {});
        },
    },
};
</script>

<style scoped>
.txt {
    line-height: 40px;
    height: auto !important;
    margin: 0;
    padding: 0;
}
</style>
